import SendMsg from "@/api/SendMsg";
import {message} from "ant-design-vue";
import i18n from "../../../i18n";

const JsCodeScanner = {
    namespaced: true,
    state: {
        // table数据
        dataSource: [],
        waferDataSource: [],
        waferMapDataSource: [],
        // 查询条件
        queryForm: {
            type: '',
            lotId: '',
        },
        typeList:[
            { value: 'WAT', lable: 'WAT' },
            { value: 'CP' , lable: 'CP'}
        ],
        loadTable: false,
        normalLotsModalVisible: false,
        dataPagination: {
            current: 1,
            pageSize: 10,
            total: 0,
            showTotal: (total, range) => {
                return `共 ${total} 项`
            },
        },
        // table选中行
        selectRow: {},
    },
    mutations: {
        //查询table
        // 清空弹窗数据
        cleanAll(state) {
            state.dataSource = [],
                state.waferDataSource = [],
                state.queryForm = {
                    type: '',
                    lotId: '',
                },
                state.dataPagination = {
                    current: 1,
                    pageSize: 10,
                    total: 0,
                    size:"small",
                    showTotal: (total, range) => {
                        return `共 ${total} 项`
                    },
                }
        },
    },
    getters: {},
    action: {}
}
export default JsCodeScanner;
